#ifndef _COLLISION_DETECTION_H_
#define _COLLISION_DETECTION_H_

#include "Point.h"

/*
	Tests whether and where a ray (origin + direction) intersects a triangle (vert0, vert1, vert2) and saves in (intersection) if it does
	
	dir must be normalized
*/
bool RayTriangleCollision(const fVec3D& orig, const fVec3D& dir, const lVec3D& vert0, const lVec3D& vert1, const lVec3D& vert2, lVec3D &intersection);

/*
	Tests whether a point (pt) is within a rectangle. The rectangle points can be any orientation, but the (angle) must be the 
	angle that the rectangle is rotated about from being axis aligned.
	For example, a diamond has points (1,0), (0,1), (-1,0), and (0,-1), and would have angle PI/2
	
	angle is in radians
*/
bool PointRectangleCollision(const fVec2D& pt, double angle, const fVec2D& a, const fVec2D& b, const fVec2D& c, const fVec2D& d);

#endif
